package com.xtq.aop;

import com.xtq.annotations.After;
import com.xtq.annotations.Before;
import com.xtq.annotations.Pointcut;

public class Aspect {
    
    
    // 定义切入点
    @Pointcut("execution(* UserService.addUser(..))")
    public void doSomethingPointcut() {
        // 这里可以定义切入点的匹配规则
    }
    @Before("doSomethingPointcut")
    public void beforeMethod() {
        System.out.println("被代理调用得到的Aspect: Before method executed.");
    }
    
    @After("doSomethingPointcut")
    public void afterMethod() {
        System.out.println("被代理调用的得到的Aspect: After method executed.");
    }
}
